from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView, RedirectView

# Uncomment the next two lines to enable the admin:
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'DjangoProject.views.home', name='home'),
    # url(r'^DjangoProject/', include('DjangoProject.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^$', RedirectView.as_view(url = '/post/'), name = 'home_page'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^post/', include('blog.post.urls')),
    url(r'^category/', include('blog.category.urls')),
    url(r'^cv/$', TemplateView.as_view(template_name = 'blog/cv.html'), name = 'cv'),
    url(r'^login/$', 'blog.views.login_user', name = 'login_user'),
    url(r'^logout/$', 'blog.views.logout_user', name = 'logout_user'),

    url(r'^family/', include('family.urls')),

    # Override just the comment post
    # url(r'^comments/', include('django.contrib.comments.urls')),
    # url(r'^$', include('blog.post.urls')),
)

#handler404 = 'blog.HttpErrorHandler.HttpError404'
#handler500 = 'blog.HttpErrorHandler.HttpError500'
#handler403 = 'blog.HttpErrorHandler.HttpError403'